﻿using System.Data.Entity;
using Domain.Pocos;

namespace Timeclock.Contexts
{
    public class TimeclockContext : DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<Timeclock.Contexts.TimeclockContext>());

        public DbSet<Office> Offices { get; set; }

        public DbSet<Department> Departments { get; set; }

        public DbSet<OnsiteCourse> OnsiteCourses { get; set; }

        //protected override void OnModelCreating(DbModelBuilder builder)
        //{
        //    builder.Entity<User>()
        //                .HasRequired(a => a.BillingAddress)
        //                .WithMany()
        //                .HasForeignKey(u => u.BillingAddressId);
        //}
    }


}
